<!doctype html>
<html lang="en">
<head>
	<base href="${request.contextPath}/"/>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<#import "/spring.ftl" as spring>
	<title><@spring.message code="login.tip"/></title>
	<link rel="shortcut icon" href="${request.contextPath}/favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" href="${request.contextPath}/css/styles.css">
</head>
<body>
<div class="htmleaf-container">
	<div class="wrapper">
		<div class="btn_01">
			<a href="${request.contextPath}/sy/login?locale=zh_CN">中文版</a>
			<a href="${request.contextPath}/sy/login?locale=en_US">Enghish</a>
		</div>
		<div class="container">
			<h1><@spring.message code="login.tip"/></h1>
			
			<form class="form" action="${request.contextPath}/sy/logindo" method="post">
				<input type="text" placeholder="账号" id="username" name="username" value="${username!''}">
				<input type="password" placeholder="密码" id="password" name="password" value="${password!''}">
				<input  type="hidden" id="locale" name="locale" value="">
				<input  type="hidden" id="msg" name="msg" value="${info!''}">
				<button type="submit" id="login-button"><@spring.message code="login.sign"/></button>
			</form>
		</div>
		
		<ul class="bg-bubbles">
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
		</ul>
	</div>
</div>

<script src="${request.contextPath}/js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="${request.contextPath}/js/layer/layer.js"></script>
<script>
	$(document).ready(function(){
		if(getQueryString("locale")!=null&&getQueryString("locale")!=''){
			$("#locale").val(getQueryString("locale"));
		}
	});
	function lanzh() {

		window.location.href = "${request.contextPath}/sy/login?locale=zh_CN";

	}
	function lanene() {
		window.location.href = "${request.contextPath}/sy/login?locale=en_US";
	}
	function getQueryString(name){
		var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
		var r = window.location.search.substr(1).match(reg);
		if(r!=null)return  unescape(r[2]); return null;
	}
	window.onload=function(){
		var msg=$("#msg").val();
		if(msg.length>0){
			layer.msg(msg);
		}

	}


</script>
</body>
</html>